Modification Name: Moderator Log Status Switch v1.0

Hack Author: WormHole @ XMB Garage

Last Updated: March 13, 2009

Modification Description:
This modification will give the option to have the Moderator action lines in threads turned on or off.

Supported Version: XMB 1.9.11 Final

Notes:
This modification is released under the GPL. You should have recieved a copy of it with this modification.

Please backup your files before installing this modification. Neither XMBGarage nor the author can be held
responsible if your board stops functioning properly due to you installing this modification.

=======================================================================================================

=======
Step 1:
=======

==================================
Go to Administration Panel -> Insert Raw SQL
==================================

==================================
Paste the following code and hit Submit:
==================================

ALTER TABLE $table_settings ADD modlog_status SET('on','off') NOT NULL default 'off';

=======================================================================================================

=======
Step 2:
=======

====================
Edit lang/English.lang.php:
====================

=======================
Add to End of File Above ?> :
=======================

// Modlog Status Switch Mod Begin
$lang['modlog_status'] = "Display Moderator Action Logs in Threads?";
// Modlog Status Switch Mod End

=======================================================================================================

=======
Step 3:
=======

==========
Edit cp.php:
==========

=====
Find:
=====

$remoteimageson = $remoteimagesoff = '';
settingHTML('attach_remote_images', $remoteimageson, $remoteimagesoff);

==========
Add Below:
==========

// Modlog Status Switch Mod Begin
$modlog_statuson = $modlog_statusoff = '';
settingHTML('modlog_status', $modlog_statuson, $modlog_statusoff);
// Modlog Status Switch Mod End

=====
Find:
=====

printsetting1($lang['editedby'], 'editedbynew', $editedbyon, $editedbyoff);

==========
Add Below:
==========

// Modlog Status Switch Mod Begin
printsetting1($lang['modlog_status'], 'modlog_statusnew', $modlog_statuson, $modlog_statusoff);
// Modlog Status Switch Mod End

=====
Find:
=====

        $remoteimages = formOnOff('remoteimages');

==========
Add Below:
==========

        // Modlog Status Switch Mod Begin
        $modlog_statusnew = formOnOff('modlog_statusnew');
        // Modlog Status Switch Mod Begin
        
=====
Find:
=====

        $sql = "UPDATE ".X_PREFIX."settings SET

============
Replace With:
============

        $sql = "UPDATE ".X_PREFIX."settings SET
            modlog_status='$modlog_statusnew',

=======================================================================================================

=======
Step 4:
=======

================
Edit viewthread.php
================

=====
Find:
=====

            $poston = $date.' '.$lang['textat'].' '.$time;
            $post['message'] = $lang["modlog_{$post['subject']}"].'<br />'.$poston;
            eval('$posts .= "'.template('viewthread_modlog').'";');

        }

============
Replace With:
============

            if ($SETTINGS['modlog_status'] == 'on') {
                $poston = $date.' '.$lang['textat'].' '.$time;
                $post['message'] = $lang["modlog_{$post['subject']}"].'<br />'.$poston;
                eval('$posts .= "'.template('viewthread_modlog').'";');
            } else {
                // Switch $thisbg to correct the altbg pattern
                $thisbg = ($thisbg == $THEME['altbg2']) ? $THEME['altbg1'] : $THEME['altbg2'];
            }
        }

=======================================================================================================

Enjoy!